<template>
  <div id="article">
<!--    图表显示-->
    <div id="article-pic" style=" height: 300px;text-align: center;"></div>
  </div>
</template>

<script>

export default {
  name: 'articleCom',
  created() {
    // this.init();
  },
  mounted() {
    this.init()
  },
  beforeUpdate() {
  },
  data(){
    return{

    }
  },
  methods:{
    //初始化
    init(){

      let chartDom = document.getElementById('article-pic');
      let myChart = this.$echarts.init(chartDom)
      let option ={
        color:["#1bb6e2"],
        xAxis: {
          type: 'category',
              data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            data: [15, 23, 22, 21, 13, 14, 26],
            type: 'line'
          }
        ]
      }
      myChart.setOption(option);

    }
  }
}
</script>

<style>

</style>
